package com.dz.mapper;

import com.dz.bean.Transaction;
import com.dz.bean.Work;
import com.dz.bean.dto.TransactionGuideRankDTO;
import com.dz.bean.dto.TransactionTrendDTO;
import com.dz.bean.dto.TransactionVisitorDistributionDTO;
import com.dz.util.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TransactionDao {
    //添加
    int add(@Param("transaction") Transaction transaction);

    //删除
    int delete(@Param("id") Integer id);

    //修改
    //int edit(@Param("transaction") Transaction transaction);

    //查询所有
    List<Transaction> all(@Param("transaction") Transaction transaction);

    //按id查询
    Transaction findById(@Param("id") Integer id);

    //分页查询
    int pageCount(@Param("transaction") Transaction transaction);
    List<Transaction> page(@Param("page") Page page, @Param("transaction")Transaction transaction);

    //查询某用户下的所有交易
    List<Work> find(Integer guideId);

    //获取交易趋势数据
    List<TransactionTrendDTO> getTransactionTrendData(@Param("days") Integer days);

    //获取地陪收入排行数据
    List<TransactionGuideRankDTO> getGuideRankData();

    //获取游客消费分布数据
    List<TransactionVisitorDistributionDTO> getVisitorDistributionData();
}
